package fr.dsax.nounet.belote.dto;

import java.util.ArrayList;
import java.util.List;

/**
 * Entity implementation class for Entity: Team
 *
 */

public class TeamDto extends GenericDto {

	private List<PlayerDto> players;
	
	private String name;
	
	private static final long serialVersionUID = 1L;

	public TeamDto() {
		super();
	}  
	
	public List<PlayerDto> getPlayers() {
		return this.players;
	}

	public void setPlayers(List<PlayerDto> players) {
		this.players = players;
	}
	
	public void setPlayers(PlayerDto ... players) {
		if(this.players == null) {
			this.players = new ArrayList<PlayerDto>();
		}
		for (PlayerDto player : players) {
			this.players.add(player);
		}
	}
	
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}
   
}
